package com.alageek.study;

import com.alageek.study.api.AbstractDisplay;
import com.alageek.study.api.impl.CharDisplay;
import com.alageek.study.api.impl.StringDisplay;

/**
 * 模版方法模式
 */
public class Main {
    public static void main(String[] args) {
        AbstractDisplay d1 = new CharDisplay('H');
        AbstractDisplay d2 = new StringDisplay("Hello, World");
        AbstractDisplay d3 = new StringDisplay("你好，世界");
        d1.display();
        d2.display();
        d3.display();
    }
}
